
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title><%= controller.controller_name %>: <%= controller.action_name %></title>
<!-- START:stylesheet -->
  <%= stylesheet_link_tag "todo", :media => "all" %>
<!-- END:stylesheet -->
  <%= javascript_include_tag 'jquery-1.4.2.min', 'jquery.validate.min', 'application' %>
</head>
<!-- END:jit -->
<body id="store">
  <div id="banner">
    <!--<img src="/images/logo.png"/>-->
    <%= @page_title || "Undefined Title" %> <br/>
    
  </div>

  <div id="columns">
    <div id="side">

      <% if !current_user %>
        <%= link_to "Register", new_account_path %> <br/>
        <%= link_to "Log In", new_user_session_path %> <br/>
       
      <% else %>
        <%= link_to "My Account", account_path %> <br/>
        <%= link_to "My Todos", :controller => "todos" %> <br/>
        <%= link_to "Logout", user_session_path, :method => :delete, :confirm => "Are you sure you want to logout?" %> <br/>

      <% end %>
    </div>

    <div id="main">

      <div align="right">
        <% unless current_user == nil then %>
          Welcome <%=current_user.email %> <br/>
        <%  end %>
        <%= pluralize User.logged_in.count, "user" %> currently logged in<br /> <!-- This based on last_request_at, if they were active < 10 minutes they are logged in -->
      </div>
      <p style="color: green"><%= flash[:notice] %></p>
      <%= yield :layout %>
    </div>
  </div>
</body>
</html>